<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<html>
<head>
<title>List All Users</title>
</head>
<body>
	<a href="${contextPath }/success">返回</a>
	
	<a href="${contextPath }/user/addView">新增</a>
	<br/><br/>
	<table width="80%" border="1">
		<tr>
			<td>userId</td>
			<td>userName</td>
			<td>password</td>
			<td width="10%">操作</td>
		</tr>
		<c:forEach items="${users }" var="u">
			<tr>
				<td>${u.userId }</td>
				<td>${u.userName }</td>
				<td>${u.password }</td>
				<td>
				    <a href="${contextPath }/user/updateView/${u.userId }">编辑</a>
				    &nbsp;&nbsp;
				    <a href="${contextPath }/user/delete/${u.userId }">删除</a>
				</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>
